package org.yzl.designPatterns.facade;

public class Computer {
    private Cpu cpu;
    private Disk disk;
    private Memory memory;

    public Computer(){
        this.cpu = new Cpu();
        this.disk = new Disk();
        this.memory = new Memory();
    }

    public void start(){
        System.out.println("computer is start");
        cpu.start();
        memory.start();
        disk.start();
    }

    public void stop(){
        System.out.println("computer is stop");
        cpu.stop();
        memory.stop();
        disk.stop();
    }
}
